package cn.wecloud.im.multiplayervideodemo.utils

import cn.wecloud.im.multiplayervideodemo.App
import cn.wecloud.im.multiplayervideodemo.ext.dir
import java.io.File

object FolderUtil {

    val APP_NAME = "WeCloudChatKit"

    private fun getBaseDir(): File? {
        return App.instance.getExternalFilesDir(APP_NAME)
    }

    fun getMediaFileDir(): File {
        return File(getBaseDir(), "Media").dir()
    }

    fun getGlideFileDir():File{
        return File(getMediaFileDir(),".image_glide_cache")
    }

    fun getDownloadFileDir():File{
        return File(getBackUpDir(),"Download").dir()
    }

    fun getBackUpDir(): File {
        return File(getBaseDir(), ".BackUp").dir()
    }

    fun getBackUpFileDir(): File {
        return File(getBackUpDir(), ".backUp").dir()
    }

    fun getImageFileDir(): File {
        return File(getMediaFileDir(), ".Photo").dir()
    }


    fun getAudioFileDir():File{//语音消息的隐藏路径
        return File(getMediaFileDir(),".Audio").dir()
    }

    fun getDocumentFileDir():File{//文档文件的隐藏路径
        return File(getMediaFileDir(),".Documents").dir()
    }

    fun getVideoFileDir():File{//视频的隐藏路径
        return File(getMediaFileDir(),".Video").dir()
    }






}